package org.jeemp.api.dao;

import org.jeemp.api.pojo.Book;
import org.jeemp.api.pojo.Category;
import org.springframework.data.jpa.repository.JpaRepository;

import java.util.List;

/**
 * @author JackRen
 * @date 2021-03-07 16:53
 * @description:
 */
public interface BookDAO extends JpaRepository<Book,Integer> {

    List<Book> findAllByCategory(Category category);
    List<Book> findAllByTitleLikeOrAuthorLike(String keyword1, String keyword2);

}
